home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Math Visin v2.1 disk 1.adf / Arexx.WB / PlotFiles < prev    next >
Text File  |  1992-02-12  |  2KB  |  79 lines

  1. /* PlotFiles, plots pictures in batch mode.   6-Mar-90 dh 
  2.  
  3.   This program is designed to plot batches of unrelated pictures while
  4. you are away from your computer.  This lets you interactively explore
  5. low-resolution functions during the day, and have MathVision plot high-
  6. resolution versions overnight.  There are two basic steps.
  7.  
  8. 1. GATHER A BUNCH OF PICTURE IDEAS ON DISK.
  9.  
  10.     In exploring a function, use a large sampling delta, which lets 
  11.     you explore quickly. Then, adjust the sampling delta for the final
  12.     high resolution plot, start it plotting, and immediately hit the
  13.     <ESC> key.  Save this using Save PictureAndFormula. This records
  14.     the size of the screen and the colors as well as the formula.  
  15.  
  16. 2. SUBMIT THE BATCH OF PICTURES TO MATHVISION USING PlotFiles.
  17.  
  18.     Click once on PlotFiles, hold down the <SHIFT> key, click on all
  19.     the pictures to be plotted, and double-click the last picture.
  20.     (This is backwards of the normal Shift-select.  Plotfiles must
  21.     be clicked FIRST.)
  22.  
  23. ==========================================================================*/
  24.  
  25. ADDRESS "MathVision"
  26. OPTIONS RESULTS
  27. SIGNAL ON ERROR
  28.  
  29. PARSE ARG CommandLine    /* break command line into filename array */
  30. Delim = d2c(10)             /* Carriage Return is delimiter */
  31.  
  32. TotalFilenames = 0
  33. DO FOREVER
  34.   position = POS(Delim,CommandLine||Delim)
  35.   IF (position<2) THEN LEAVE
  36.   TotalFilenames = TotalFilenames+1
  37.   Filename.TotalFilenames = Left(CommandLine,position-1)
  38.   CommandLine = SubStr(CommandLine,position+1)
  39. END
  40.  
  41. StopSign "F"
  42. QuitIt = "F"
  43.  
  44. DO i = 1 to TotalFilenames        /* scan through list of files */
  45.   IF EXISTS(filename.i)
  46.   THEN
  47.     DO
  48.       SAY "Plotting (" TIME() "): " filename.i
  49.       Pathname filename.i        /* set the pathname */
  50.       LoadPictureAndFormula        /* load the function */
  51.  
  52.       Get Comment3            /* look in comment3 for */
  53.       comm = RESULT            /* special plotting info */
  54.       IF (Word(comm,1) = "AREXX")
  55.       THEN INTERPRET substr( comm, 6)
  56.       ELSE Plot
  57. /*      Get PlotMode            /* plot in correct mode */
  58.       t = "Plot"RESULT
  59.       INTERPRET T
  60. */      SavePictureAndFormula        /* save it */
  61.     END
  62.   ELSE
  63.     DO
  64.       SAY "Can't Open Plot File: "filename.i
  65.     END
  66.   Get StopSign
  67.   QuitIt = RESULT
  68.   if (QuitIt=="T") THEN BREAK
  69. END
  70.  
  71. SAY "Plotting Completed" TIME()
  72. EXIT
  73.  
  74. ERROR:            /* Error Diagnostic for return codes */
  75.   Get Diagnosis RC
  76.   SAY RESULT" on line "SIGL
  77.   do i=0 to 500; end
  78.   EXIT
  79.